This I had create a comunication between 2 or more boards, using I2C, ISP, or ESP. I decided to use I2C to link my light sensor board and the LCD screen board.
Since I didn't know neither what I2C was, I read the 17th chapter of Make: AVR programming.
It explained in avery clear way the theory, how it worked and what I had to do.
In order to do it, I checked the Arduino's Wire library.
I tried to program it in avr c during the past weeks, but it was too hard for me since I had no background
in programming.
In this page everything is explained pretty well. The connection I was looking for was
a master-slave one, where
the light sensor board is the master/reader, and the LCD screen is the slave/sender.
Since this assignment was way more hard then I thought, I decided to use a Arduino board as
master, and the photoresistor board as slave. Eventually I will try to connect the LCD
display to read the data.
I2C comunication works via 2 wires:
SDA: this is where the data travel.
SCL: this is the "timer", it allows the synchronization between the boards.
For the slave board I needed Tiny Wire library,
so I downloaded it and I included it in my sketch. In the beginning I had some problems
including it, that was because I had two installation of Arduino: one as root, and
one as normal user and they didn't share the libraries. So I had unistall the
normal user one and install all the libraries I needed on the root one.
These are the two boards connected, you can see 4 wires: